#pragma ident "$Id: ComputeStaClock.hpp $"

/**
 * @file ComputeStaClock.hpp
 * This is a class to compute the station clock bias.
 */

#ifndef GPSTK_COMPUTE_STATION_CLOCK_HPP
#define GPSTK_COMPUTE_STATION_CLOCK_HPP

//============================================================================
//
//
//  Kaifa Kuang, Wuhan University, 2017
//
//============================================================================


#include "ProcessingClass.hpp"
#include "DataStructures.hpp"
#include "CommonHeader.hpp"


namespace gpstk
{

      /** @addtogroup GPSsolutions */
      //@{

      /** This class computes the station clock bias.
       *
       *  A typical way to use this class follows:
       *
       * @code
       *
       * @endcode
       *
       */
    class ComputeStaClock : public ProcessingClass
    {
    public:

        /// Default constructor.
        ComputeStaClock()
            : minSatGPS(4), maxRMSGPS(3.0), minSatGal(3), maxRMSGal(5.0)
        {};


        /** Return a satTypeValueMap object, adding the new data generated
         *  when calling this object.
         *
         * @param gData    Data object holding the data.
         */
        virtual satTypeValueMap& Process(satTypeValueMap& gData)
            noexcept(false);



         /** Return a gnssRinex object, adding the new data generated
          *  when calling this object.
          *
          * @param gData    Data object holding the data.
          */
        virtual void Process(commonHeader& comHeader, gnssRinex& gData)
            noexcept(false);


         /** Return a sourceRinex object, adding the new data generated
          *  when calling this object.
          *
          * @param gData    Data object holding the data.
          */
        virtual void Process(commonHeader& comHeader, sourceRinex& gData)
            noexcept(false);


        virtual ComputeStaClock& setMinSatOfGPS(int sat)
        { minSatGPS = sat; return (*this); };


        virtual ComputeStaClock& setMinSatOfGal(int sat)
        { minSatGal = sat; return (*this); };


        virtual ComputeStaClock& setMaxRMSOfGPS(double rms)
        { maxRMSGPS = rms; return (*this); };


        virtual ComputeStaClock& setMaxRMSOfGal(double rms)
        { maxRMSGal = rms; return (*this); };


        /// Get source clock.
        virtual sourceValueMap getSourceClock() const
        { return sourceClock; };


         /// Return a string identifying this object.
        virtual std::string getClassName(void) const;


         /// Destructor.
        virtual ~ComputeStaClock() {};


    private:

        /// If this source to be rejected
        bool sourceRejected;

        int minSatGPS;

        double maxRMSGPS;

        int minSatGal;

        double maxRMSGal;

        /// station clock
        double clock;

        /// station clock
        sourceValueMap sourceClock;

    }; // End of class 'ComputeStaClock'

    //@}

}  // End of namespace gpstk

#endif   // GPSTK_COMPUTE_STATION_CLOCK_HPP
